from selenium import webdriver
import time
import json
from selenium.webdriver.common.by import By

driver = webdriver.Edge()
driver.get("https://www.liepin.com/zhaopin/?city=410&dq=410&pubTime=&currentPage=0&pageSize=40&key=&suggestTag=&workYearCode=&compId=&compName=&compTag=&industry=&salary=0$3&jobKind=&compScale=&compKind=&compStage=&eduLevel=&otherCity=&sfrom=search_job_pc&ckId=fre3flqhfaqj2dq4ce76o9h2ufp85qe8&scene=condition&skId=w31suayz4i5hat0t1h47e1tlf52ermn8&fkId=6flctiwfkikiylf1hgac95cnyaw60h79&suggestId=")
time.sleep(40)

# 把登录状态下的cookie写入json文件中
cookies = driver.get_cookies()
json_cookies = json.dumps(cookies)
with open('cookies.json', 'w') as f:
    json.dump(cookies, f)

driver.quit()
